package com.example.shopingcenter.usercenter;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;

import com.example.shopingcenter.MainAllFragActivity;
import com.example.shopingcenter.R;

public class StartActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_start);


        // 设置延迟时间，例如3秒
        new android.os.Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                // 启动主界面 Activity
                Intent intent = new Intent(StartActivity.this, MainAllFragActivity.class);
                startActivity(intent);
                finish(); // 关闭当前 Activity
            }
        }, 3000); // 3000 毫秒 = 3 秒
    }
}
